package com.qk.management.mapper;

import com.qk.dto.acticity.ActivityDto;
import com.qk.entity.Activity;
import com.qk.vo.ActivityVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface ActivityMapper {
    List<ActivityVO> getActivity(ActivityDto activityDto);

    @Delete("delete from activity where id=#{activityid}")
    void deleteActivity(Integer activityid);

    void insert(Activity activity);

    @Select("select * from activity where id=#{activityid}")
    Activity selectById(Integer activityid);

    void updateActivity(Activity activity);

    @Select("select * from activity where type=#{type}")
    List<ActivityVO> selectByType(Integer type);
}
